#include <iostream>
#include <algorithm>

int main()
{
	int a, b;
	std::cin >> a >> b;
	int t = std::min(a, b);
	std::cout << t;
	a -= t;
	b -= t;
	std::cout << ' ' << std::max(a, b) / 2 << '\n';
}
